package dao.interfaces;

import engine.Node;
import java.util.ArrayList;

/**
 * A data access object interface for nodes.
 * @author Johnny
 */
public interface NodeDao {
    /**
     * Returns the list of nodes.
     * @return the list of nodes.
     */
    public ArrayList<Node> getNodes();

    /**
     * Returns a node with all it's attributes.
     * @param nodeId the returnable node's id.
     * @return the node itself.
     */
    public Node getNode(int nodeId);

    /**
     * Adds a node to the data source.
     * @param x The node's x position.
     * @param y The node's y position.
     * @param name The node's name.
     * @return the newly created node.
     */
    public Node addNode(float x, float y, String name);

    /**
     * Deletes a node from the data source.
     * @param nodeId the id of the node that will be deleted.
     */
    public void removeNode(int nodeId);

    /**
     * Updates the node in the datasource.
     * @param node the updated node.
     */
    public void updateNode(Node node);
    
}
